import {define, WeElememt,render, WeElement} from "omi"

import './index.css'

const app = getApp()

const WxParse = require('../../../wxParse/wxParse.js');
import { get } from '../../../utils/util'
import api from '../../../api/api.js'

define('park-describe',class extends WeElement {
    config={
        navigationBarTitleText:"景区详情"
    }
    data={
        content:"<h1>hello</h1>",
        miaoshu:'',
        desc:""
    }

    install(option){
      console.log(option);

      //获取景区详情
      get(api.get_scenic_content,{
        scenic_id: option.scenic_id
      })
      .then((res)=>{
        console.log(res);
        this.data.desc = res.data[0];
        console.log(this.data.desc);
        this.update();
      })
        // var that = this
        // WxParse.wxParse('miaoshu', 'html', that.data.content, that, 5);
        this.update();
    }


    render(){
        return(
            <view>
           
                // <import src="../../../wxParse/wxParse.wxml"/>
                // <template is="wxParse" data="{{wxParseData:miaoshu.nodes}}"/>
              11111111111111
              <view> {desc}</view>
            </view>
        )
    }

})

